#ifndef QUEUE_H
#define QUEUE_H

#include <stdint.h>

#define DATA_QUEUE_SIZE 5

typedef int32_t ElementType;

typedef struct {
    ElementType data[DATA_QUEUE_SIZE];
    int32_t _last;
} DATA_Queue;

void DATA_QueueInit(DATA_Queue *queue);
void DATA_QueueEnqueue(DATA_Queue *queue, ElementType element);
void DATA_QueueClear(DATA_Queue *queue);

ElementType DATA_QueueGet(const DATA_Queue *queue, int32_t index);
ElementType DATA_QueueSum(const DATA_Queue *queue);
float DATA_QueueAvg(const DATA_Queue *queue);
float DATA_QueueVariance(const DATA_Queue *queue);
int32_t DATA_QueueLength(const DATA_Queue *queue);

#endif //QUEUE_H
